package game.particles;

import game.shared.Constants;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.ParticleEffect;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.utils.Array;

public class ParticleCloudFire extends AbsParticle{
	
	

	public ParticleCloudFire() {
		effect = new ParticleEffect();
		effect.load(Gdx.files.internal(Constants.PARTICLE_CLOUD_FIRE_1), Gdx.files.internal(Constants.PARTICLE_CLOUD_FIRE_2));
        effect.setPosition(Gdx.graphics.getWidth() / 2 + 30, Gdx.graphics.getHeight()-16);
        emitters = new Array(effect.getEmitters());
        effect.getEmitters().clear();
        effect.getEmitters().add(emitters.get(0));
        effect.getEmitters().add(emitters.get(1));
        
        effect.start();
	}

	@Override
	public void update() {
//		if (fpsCounter > 3) {
//			fpsCounter = 0;
//			effect.start();
//		}
	}

	@Override
	public void render(SpriteBatch sb) {
		float delta = Gdx.graphics.getDeltaTime();
		effect.draw(sb, delta);
		fpsCounter += delta;
	}

}
